import request from "@/utils/request";

export function listType(query) {
  return request({
    url: "/cms/user/list",
    method: "get",
    params: query
  });
}

export function addType(obj,send=false) {
  return request({
    url: "/cms/user?send="+send,
    method: "post",
    data: obj
  });
}

export function getType(id) {
  return request({
    url: "/cms/user/" + id,
    method: "get"
  });
}

export function delType(id) {
  return request({
    url: "/cms/user/" + id,
    method: "delete"
  });
}

export function updateType(obj,send=false) {
  return request({
    url: "/cms/user?send="+send,
    method: "put",
    data: obj
  });
}
export function changeStatus(obj) {
  return request({
    url: "/cms/user/changeStatus",
    method: "post",
    data: obj
  });
}
export function uploadExcel(obj) {
  return request({
    url: "/cms/user/upload",
    method: "post",
    data: obj
  });
}

export function forgetPassword(obj) {
  return request({
    url: "/cms/user/forgetPassword",
    method: "post",
    data: obj
  });
}
export function resetpassword(obj) {
  return request({
    url: "/cms/user/resetpassword",
    method: "post",
    data: obj
  });
}

export function exportUser(obj) {
  return request({
    url: "/cms/user/export",
    method: "get",
    params: obj
  });
}

